// 产品序列号管理
import request from '@/router/axios';

// 查询外部包装条码
export const getOutPackingList = (option, current, size, params) => {
  return request({
    url: '/api/mes-warehouse/packing/query/page/outer/sn',
    method: 'get',
    params: {
      ...params,
      current,
      size
    },
    ...option
  });
};

// 查询外部产品序列号
export const getOutList = (option, current, size, params) => {
  return request({
    url: '/api/mes-admin/label-product/page/outer/sn',
    method: 'get',
    params: {
      ...params,
      current,
      size
    },
    ...option
  });
};

export const getList = (option, current, size, params) => {
  return request({
    url: '/api/mes-admin/sequence/pool/page?descs=seq,create_time&ascs=status',
    method: 'get',
    params: {
      ...params,
      current,
      size
    },
    ...option
  });
};

export const outSnRemove = (ids) => {
  return request({
    url: '/api/mes-admin/label-product/remove/outer/sn',
    method: 'post',
    data: ids
  });
};

export const outPackSnRemove = (ids) => {
  return request({
    url: '/api/mes-warehouse/packing/remove/outer/packing-no',
    method: 'post',
    data: ids
  });
};

export const regeneratedSnRemove = (ids) => {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    url: '/api/mes-admin/sequence/pool/remove',
    method: 'post',
    data: ids
  });
};
